using System;
using SqlSugar;

namespace Catastrophe.BasePC.UI.Model
{
	/// <summary>
	/// 用户表
	/// </summary>
	[SugarTable("sys_user")]
	public class SysUserEntity
	{
		[SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "id")]
		public int Id { get; set; }

		[SugarColumn(ColumnName = "user_name", IsNullable = true)]
		public string UserName { get; set; }

		[SugarColumn(ColumnName = "user_no", IsNullable = true)]
		public string UserNo { get; set; }

		[SugarColumn(ColumnName = "barcode", IsNullable = true)]
		public string Barcode { get; set; }

		[SugarColumn(ColumnName = "class_line", IsNullable = true)]
		public string ClassLine { get; set; }

		[SugarColumn(ColumnName = "depart", IsNullable = true)]
		public string Depart { get; set; }

		[SugarColumn(ColumnName = "login_password", IsNullable = true)]
		public string LoginPassword { get; set; }

		[SugarColumn(ColumnName = "authority_flag", IsNullable = true)]
		public int AuthorityFlag { get; set; }

		[SugarColumn(ColumnName = "identify", IsNullable = true)]
		public string Identify { get; set; }

		[SugarColumn(IsIgnore = true)]
		public bool IsAdministrators => this.Identify == "管理员";

		[SugarColumn(ColumnName = "time_stamp", IsNullable = true)]
		public string TimeStamp { get; set; }

		[SugarColumn(ColumnName = "phone", IsNullable = true)]
		public string Phone { get; set; }

		[SugarColumn(ColumnName = "remark", IsNullable = true)]
		public string Remark { get; set; }

		[SugarColumn(ColumnName = "state", IsNullable = true)]
		public int State { get; set; }

		[SugarColumn(ColumnName = "email", IsNullable = true)]
		public string Email { get; set; }

		[SugarColumn(ColumnName = "first_visit", IsNullable = true)]
		public DateTime FirstVisit { get; set; }

		[SugarColumn(ColumnName = "last_visit", IsNullable = true)]
		public DateTime LastVisit { get; set; }

		[SugarColumn(ColumnName = "authorize_type", IsNullable = true)]
		public string AuthorizeType { get; set; }

		[SugarColumn(ColumnName = "authorize_refresh", IsNullable = true)]
		public bool AuthorizeRefresh { get; set; }
	}
}
